package com.smarttiger.zero.admin.service;

import com.smarttiger.zero.admin.dao.InterfaceUsersGroupDao;
import com.smarttiger.zero.admin.entity.InterfaceUsersGroupModel;
import com.smarttiger.zero.admin.util.ParamNames;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
public class InterfaceUsersGroupService extends BaseService<InterfaceUsersGroupModel>{
    @Autowired
    InterfaceUsersGroupDao interfaceUsersGroupDao;

    @PostConstruct
    public void initMethod(){
        super.setDao(interfaceUsersGroupDao);
    }

    @ParamNames("id")
    public List<InterfaceUsersGroupModel> getInterfaceUsersGroupByInterfaceId(String id){
        return interfaceUsersGroupDao.findAllByInterfaceId(id);
    }

}
